home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
fractals
/
ifslab
/
ifslab.doc
< prev
next >
Wrap
Text File
|
1994-11-17
|
43KB
|
875 lines
/*******************************************************************\
* *
* IFS Lab - Iterated Function System Encoding/Rendering Program. *
* *
* Written by Nathan Zeldes, 16 Bet Hakerem St., *
* Jerusalem 96343, Israel. *
* *
* Copyright (C) 1992 by Nathan Zeldes. All Rights Reserved. *
* *
* PROGRAM DOCUMENTATION Version 1.0, June 24, 1992 *
* *
* *
\*******************************************************************/
NOTE: This program uses the file requester in the freeware requester
library written by C.W. Fox and Bruce Dawson. The library file,
req.library, should be placed in your libs: directory. If req.library
is missing, the program will still run but file I/O will be disabled.
=========================
Contents of this Doc File
=========================
Part I. Copyright and Distribution
Part II. User Documentation
1. Quick Start
2. Overview
3. Nomenclature
4. Program Operation philosophy
5. Outline Editor Mode Operation
6. Collage Editor Mode Operation
7. Rendering Mode Operation
8. File I/O Operation
Part III. Programmer Notes
1. Coordinate system and Coefficient Ranges
2. Screens and Windows
3. Outline/Collage Window Colour Scheme
4. Gadget ID's
5. Outline Editor
6. Piece Storage
7. Collage Display mechanics
8. Coefficients Window issues
9. Rendering Mechanics
10. Compilation and Linking
11. Known Bugs
==================================
Part I. Copyright and Distribution
==================================
IFSLab is Copyright (C) 1992 by Nathan Zeldes, 16 Bet Hakerem St.,
Jerusalem 96343, Israel.
This program is made available in the hope that it will give enjoyment to Amiga
users. Permission is granted to freely use and distribute IFSLab subject to
the following conditions:
a. No profit is made on it in any way. Nominal charges to cover cost of
media, duplication, shipping, online services, etc are allowed.
b. The package is distributed in its complete form, consisting of the source
(files IFSLab.c and IFSLab.h), the executable (IFSLab), this documentation
file (IFSLab.doc), the requester library files req.library and req.readme,
and the IFS code files in the subdirectory IFScodes.
c. None of the files is modified in any way without the written permission of
the author.
d. Inclusion of IFSLab in any commercial product is not permitted without the
written permission of the author.
DISCLAIMER: Although it has been tested extensively, IFSLab is provided
"as is", without warranty of any kind. In no event will the author be liable
for any direct or indirect damage or loss resulting from the use or misuse of
this program.
ACKNOWLEDGEMENTS
The IFS method has been developed by Dr. Michael Barnsley (see references in
Overview section below).
Thanks to C.W. Fox and Bruce Dawson for the file requester from their excellent
freeware requester library for the Amiga.
===========================
Part II. User Documentation
===========================
1. Quick Start
--------------
Part II of this doc file contains detailed instructions. If you want to get the
full benefit from this program, you should read it all. The present section is
for the impatient and/or knowledgeable, who want to try the program out right
away!
To run IFSLab, you should first copy the file req.library to your libs:
directory (if you don't have it there already). If you don't, you will still
be able to run IFSLab, but without the ability to load or save files.
Start IFSLab by double clicking its icon, or by typing its name in the Shell or
CLI. Now select the HELP item from the ABOUT menu, and read the brief
instructions it will give you on-screen. Then select the DEMO item from the
ABOUT menu. This will launch a demo of generation of the Sierpinski Triangle,
and illustrate the operation of the program.
Next you may want to load some IFS codes by the PROJECT/LOAD FILE/IFS menuitem;
some interesting codes found by the author and by others are in the directory
'IFScodes'. When a code has been loaded, select the RENDER/START menuitem to
render its attractor. After you've tried the codes in the files, you're on
your own - try to build your own IFS codes (here you will probably HAVE to read
the instructions), and have fun!
2. Overview
-----------
This program implements the IFS algorithm described by Barnsley and Sloan to
allow the design and rendering of fractals in a user-friendly environment. It
provides for the convenient sketching of approximate image outlines by a
paint-program-like mouse-driven user interface, and for definition of IFS Codes
either from a mouse-driven Collage editor or by numeric entry from the
keyboard. The Attractors of the resultant IFS Codes can be rendered in black
and white or in grayscale, in a user-defined resolution. Outlines, IFS Codes
and rendered Images can be saved to or read from disk. The program has a very
flexible IFS loader, which can read IFS code files generated by most other IFS
programs, extracting the relevant codes and converting them as necessary to fit
this program's conventions. On reading in a file, or at the user's command at
any time, the program will generate a collage for the current IFS (using its
attractor as the Outline). A facility for modifying an IFS to fit in the full
screen size is also provided.
For more detailed information on the theory and use of IFS, refer to:
a. M. Barnsley and A. Sloan: A Better Way to Compress Images, BYTE, Jan. 88.
b. H.O. Peitgen and D. Saupe, eds.: The Science of Fractal Images, Chapter 5.
Springer-Verlag, 1988.
c. M.Barnsley: Fractals Everywhere, Academic Press, 1988.
3. Nomenclature
---------------
In this document and program, the following terminology is used:
* Outline - a rough sketch of the fractal-to-be, used as the basis for the
reduced images that form the Collage.
* Transformation - a contractive affine transformation.
* IFS (Iterated Function System), used interchangeably with 'IFS Code' -
a set of N Transformations and their associated probabilities.
* Attractor - the exact fractal image represented by the IFS.
* Density - A parameter assigned to each transformation which describes
its probability per unit area, i.e. how bright it will appear in the
rendering process relative to the other transformations. See details in
section 5, "Collage Editor Mode Operation", under "Definition of Piece
Probabilities".
* Collage - an IFS, represented graphically as an overlay of the Transformed
Outlines on the original Outline.
* Piece - A single transformed image of the outline. The Collage is made from
a set of up to 20 Pieces, representing the transformations in the IFS.
* Image - the reconstructed image (Attractor), as rendered from the IFS using
the random iteration algorithm.
* Coordinate Convention: The Top Left corner of the display area is defined as
the Origin, (0,0), with the positive X axis going to the right and the
positive Y axis going downward. The full display area is defined as 1 unit
in width and 0.6775 units in height (for purposes of the translation
coefficients). This convention makes the rectangular window used for editing
represent the top 2/3 (approximately) of a 1x1 square area in the Real plane.
4. Program Operation philosophy
-------------------------------
IFS Lab differs from some other IFS programs in that it focuses on the Collage
Theorem, i.e. on the fact that in an IFS, the attractor is covered exactly by
its transformed copies. Thus, IFS Lab will allow you to create the Collage
directly, Jigsaw-puzzle style, from actual reduced/deformed images of the
Outline that you can manipulate graphically with t